#include <bits/stdc++.h>
using namespace std;

template <class T>
void read(T &x)
{
    x = 0;
    char ch = getchar();
    while (ch < '0' || ch > '9')
        ch = getchar();
    while (ch >= '0' && ch <= '9')
        x = (x * 10) + (ch ^ 48), ch = getchar();
}

template <class T, class... ARK>
void read(T &x, ARK &...ark)
{
    x = 0;
    char ch = getchar();
    while (ch < '0' || ch > '9')
        ch = getchar();
    while (ch >= '0' && ch <= '9')
        x = (x * 10) + (ch ^ 48), ch = getchar();
    read(ark...);
}

#define maxn 100005

int n, a[maxn];

int main()
{
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    read(n);
    for (int i = 1; i <= n; ++i)
        read(a[i]);
    sort(a + 1, a + n + 1);
    int j = 1;
    for (int i = 1; i <= n; ++i)
    {
        if (a[i] > a[j])
            ++j;
    }
    printf("%d\n", n - j + 1);
    return 0;
}